<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <div class="jumbotron">
            <h1>手机商城</h1>
            <p>...</p>
            <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more...</a></p>
        </div>

        <div class="row">
            <c:forEach var="p" items="${products }">
            <div class="col-xs-12 col-sm-6 col-md-3 col-lg-2" style="border:1px solid #CCC; border-radius: 10px;">
                <h2 style="height:70px;"><b class="glyphicon glyphicon-phone">${p.name}</b></h2>
                <p>价格：<b class="glyphicon glyphicon-yen"></b>${p.price}</p>
                <p>库存：<b class="glyphicon glyphicon-th-list"></b>${p.count} </p>
                <p style="height:120px;" class="alert alert-success">${p.desc }</p>
                <a class="btn btn-danger" href="/products/get/${p.id}">购买</a>
                <a class="btn btn-primary" href="/products/info?id=${p.id}">查看</a>
                <a class="btn btn-waring" href="/products/edit/${p.id}">编辑</a>
            </div>
            </c:forEach>
        </div>
    </div>
</body>
</html>
